﻿using System;
using System.Web;

namespace Components.Runtime
{
  public class PageHandlerFactory : System.Web.UI.PageHandlerFactory
  {
    public override IHttpHandler GetHandler(HttpContext context, string requestType, string virtualPath, string path)
    {
      if (Context.Element != null)
      {
        return new PageHandler();
      }
      return base.GetHandler(context, requestType, virtualPath, path);
    }
  }
}